using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class InitBuffer : GeneratedMessageLite<InitBuffer, InitBuffer.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<InitBuffer, InitBuffer.Builder>
		{
			private bool resultIsReadOnly;
			private InitBuffer result;
			protected override InitBuffer.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override InitBuffer MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override InitBuffer DefaultInstanceForType
			{
				get
				{
					return InitBuffer.DefaultInstance;
				}
			}
			public uint MaxSyncKey
			{
				get
				{
					return this.result.MaxSyncKey;
				}
				set
				{
					this.SetMaxSyncKey(value);
				}
			}
			public Builder()
			{
				this.result = InitBuffer.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(InitBuffer cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private InitBuffer PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					InitBuffer other = this.result;
					this.result = new InitBuffer();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override InitBuffer.Builder Clear()
			{
				this.result = InitBuffer.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override InitBuffer.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new InitBuffer.Builder(this.result);
				}
				return new InitBuffer.Builder().MergeFrom(this.result);
			}
			public override InitBuffer BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override InitBuffer.Builder MergeFrom(IMessageLite other)
			{
				if (other is InitBuffer)
				{
					return this.MergeFrom((InitBuffer)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override InitBuffer.Builder MergeFrom(InitBuffer other)
			{
				return this;
			}
			public override InitBuffer.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override InitBuffer.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(InitBuffer._initBufferFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = InitBuffer._initBufferFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 8u)
					{
						if (WireFormat.IsEndGroupTag(num))
						{
							return this;
						}
						this.ParseUnknownField(input, extensionRegistry, num, text);
					}
					else
					{
						this.result.hasMaxSyncKey = input.ReadUInt32(ref this.result.maxSyncKey_);
					}
				}
				return this;
			}
			public InitBuffer.Builder SetMaxSyncKey(uint value)
			{
				this.PrepareBuilder();
				this.result.hasMaxSyncKey = true;
				this.result.maxSyncKey_ = value;
				return this;
			}
			public InitBuffer.Builder ClearMaxSyncKey()
			{
				this.PrepareBuilder();
				this.result.hasMaxSyncKey = false;
				this.result.maxSyncKey_ = 0u;
				return this;
			}
		}
		public const int MaxSyncKeyFieldNumber = 1;
		private static readonly InitBuffer defaultInstance;
		private static readonly string[] _initBufferFieldNames;
		private static readonly uint[] _initBufferFieldTags;
		private bool hasMaxSyncKey;
		private uint maxSyncKey_;
		private int memoizedSerializedSize = -1;
		public static InitBuffer DefaultInstance
		{
			get
			{
				return InitBuffer.defaultInstance;
			}
		}
		public override InitBuffer DefaultInstanceForType
		{
			get
			{
				return InitBuffer.DefaultInstance;
			}
		}
		protected override InitBuffer ThisMessage
		{
			get
			{
				return this;
			}
		}
		public uint MaxSyncKey
		{
			get
			{
				return this.maxSyncKey_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasMaxSyncKey;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasMaxSyncKey)
				{
					num += CodedOutputStream.ComputeUInt32Size(1, this.MaxSyncKey);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private InitBuffer()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] initBufferFieldNames = InitBuffer._initBufferFieldNames;
			if (this.hasMaxSyncKey)
			{
				output.WriteUInt32(1, initBufferFieldNames[0], this.MaxSyncKey);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasMaxSyncKey)
			{
				num ^= this.maxSyncKey_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			InitBuffer initBuffer = value as InitBuffer;
			return initBuffer != null && (this.hasMaxSyncKey == initBuffer.hasMaxSyncKey && (!this.hasMaxSyncKey || this.maxSyncKey_.Equals(initBuffer.maxSyncKey_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<InitBuffer, InitBuffer.Builder>.PrintField("MaxSyncKey", this.hasMaxSyncKey, this.maxSyncKey_, writer);
		}
		public static InitBuffer ParseFrom(byte[] data)
		{
			return InitBuffer.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private InitBuffer MakeReadOnly()
		{
			return this;
		}
		public static InitBuffer.Builder CreateBuilder()
		{
			return new InitBuffer.Builder();
		}
		public override InitBuffer.Builder ToBuilder()
		{
			return InitBuffer.CreateBuilder(this);
		}
		public override InitBuffer.Builder CreateBuilderForType()
		{
			return new InitBuffer.Builder();
		}
		public static InitBuffer.Builder CreateBuilder(InitBuffer prototype)
		{
			return new InitBuffer.Builder(prototype);
		}
		static InitBuffer()
		{
			InitBuffer.defaultInstance = new InitBuffer().MakeReadOnly();
			InitBuffer._initBufferFieldNames = new string[]
			{
				"MaxSyncKey"
			};
			InitBuffer._initBufferFieldTags = new uint[]
			{
				8u
			};
			object.ReferenceEquals(micromsg.Proto.InitBuffer.Descriptor, null);
		}
	}
}
